package com.hopu.mybatis_plus_demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_employee")
public class Employee {

  @TableId(type = IdType.AUTO)
  private long id;
  private String name;
  private long age;
  private String gender;
  private long deptId;
  private String position;

  //在表字段中不存在
  @TableField(exist = false)
  private Department department;
}
